package com.ruoyi.system.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 优惠卷对象 preferential
 * 
 * @author ruoyi
 * @date 2022-12-25
 */
public class Preferential extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** id */
    private Long pid;

    /** 名称 */
    @Excel(name = "名称")
    private String pname;

    /** 数量 */
    @Excel(name = "数量")
    private Long pnum;

    /** 使用数量 */
    @Excel(name = "使用数量")
    private Long usage;

    /** 开始使用时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "开始使用时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date startTime;

    /** 结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date endTime;

    /** 优惠卷类型 */
    @Excel(name = "优惠卷类型")
    private String type;

    /** 1是已发布2未发布 */
    @Excel(name = "1是已发布2未发布")
    private Long condition;

    /** 1已使用2未使用 */
    @Excel(name = "1已使用2未使用")
    private Long whereUse;

    /** 关联id */
    @Excel(name = "关联id")
    private Long eid;


    public void setPid(Long pid)
    {
        this.pid = pid;
    }

    public Long getPid()
    {
        return pid;
    }
    public void setPname(String pname)
    {
        this.pname = pname;
    }

    public String getPname()
    {
        return pname;
    }
    public void setPnum(Long pnum)
    {
        this.pnum = pnum;
    }

    public Long getPnum()
    {
        return pnum;
    }
    public void setUsage(Long usage)
    {
        this.usage = usage;
    }

    public Long getUsage()
    {
        return usage;
    }
    public void setStartTime(Date startTime)
    {
        this.startTime = startTime;
    }

    public Date getStartTime()
    {
        return startTime;
    }
    public void setEndTime(Date endTime)
    {
        this.endTime = endTime;
    }

    public Date getEndTime()
    {
        return endTime;
    }
    public void setType(String type)
    {
        this.type = type;
    }

    public String getType()
    {
        return type;
    }
    public void setCondition(Long condition)
    {
        this.condition = condition;
    }

    public Long getCondition()
    {
        return condition;
    }
    public void setWhereUse(Long whereUse)
    {
        this.whereUse = whereUse;
    }

    public Long getWhereUse()
    {
        return whereUse;
    }
    public void setEid(Long eid)
    {
        this.eid = eid;
    }

    public Long getEid()
    {
        return eid;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("pid", getPid())
            .append("pname", getPname())
            .append("pnum", getPnum())
            .append("usage", getUsage())
            .append("startTime", getStartTime())
            .append("endTime", getEndTime())
            .append("type", getType())
            .append("condition", getCondition())
            .append("whereUse", getWhereUse())
            .append("eid", getEid())
            .toString();
    }
}
